<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Logo -->
<a href="#" class="logo">
  <!-- mini logo for sidebar mini 50x50 pixels -->
  <span class="logo-mini"><b>牛</b></span>
  <!-- logo for regular state and mobile devices -->
  <span class="logo-lg"><img  src="/dist/img/niudu.png"  style="width: 35px;"><b>牛犊游戏</b></span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top">
  <!-- Sidebar toggle button-->
  <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
    <span class="sr-only">Toggle navigation</span>
  </a>
  <div class="navbar-custom-menu">
    <ul class="nav navbar-nav">

      <!--<li class="dropdown notifications-menu">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
          <i class="fa fa-bell-o"></i>
          <span class="label label-warning">1</span>
        </a>
        <ul class="dropdown-menu">
          <li class="header">有1条消息</li>
          <li>
            &lt;!&ndash; inner menu: contains the actual data &ndash;&gt;
            <ul class="menu">
              <li>
                <a href="#">
                  <i class="fa fa-users text-aqua"></i> 消息1
                </a>
              </li>
              <li>
                <a href="#">
                  <i class="fa fa-warning text-yellow"></i>消息2
                </a>
              </li>
            </ul>
          </li>
        </ul>
      </li>-->

      <li class="dropdown user user-menu">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
          <img id="head_s" src="/dist/img/user3-128x128.jpg" class="user-image" alt="User Image">
          <span class="hidden-xs" id="nickname_s">admin</span>
        </a>
        <ul class="dropdown-menu">
          <!-- User image -->
          <li class="user-header">
            <img id="head_d" src="/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
            <p id="nickname_d"></p>
          </li>
          <li class="user-footer">
            <div class="pull-left">
              <a href="editer.html" class="btn btn-default btn-flat">设置</a>
            </div>
            <div class="pull-right">
              <a href="#" onclick="loginout()" class="btn btn-default btn-flat">退出</a>
            </div>
          </li>
        </ul>
      </li>
      <!-- Control Sidebar Toggle Button -->
    </ul>
  </div>
</nav>
<script src="/dist/js/store.min.js"></script>
<script>
    $(function () {
        var user_info = store.get("user_info");
        if(user_info == null){
            window.location.href = "/pages/channel/login.html";
        } else {
            $("#nickname_s").html(user_info.wmname);
            $("#nickname_d").html(user_info.wmname);
            // $("#head_s").attr("src", user_info.head);
            // $("#head_d").attr("src", user_info.head);
        }
    });
    function loginout() {
        var url="/lmgame/user/loginout";
        $.ajax({
            type : 'POST',
            url : url,
            dataType : "json",
            success: function(data) {
                window.location.href="/index2.html";
            }
        });
    }
</script>
<style>
  .notab {
    white-space:nowrap;
  }
</style>